package com.bjbn.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 短信请求DTO
 */
@Data
@Schema(description = "短信发送请求")
public class SmsRequestDto {
    
    /**
     * 手机号（支持多个，英文逗号分隔）
     */
    @Schema(description = "手机号，多个用逗号分隔", example = "13800138000,13800138001", required = true)
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}(,1[3-9]\\d{9})*$", message = "手机号格式不正确")
    private String mobiles;
    
    /**
     * 短信内容
     */
    @Schema(description = "短信内容", example = "测试短信", required = true)
    @NotBlank(message = "短信内容不能为空")
    private String content;
    
    /**
     * 名称，对本次发送的短信的目的、原因或内容等的简述
     */
    @Schema(description = "短信名称", example = "测试短信")
    private String name;
    
    /**
     * 模版ID，发送普通短信时值为""
     */
    @Schema(description = "模板ID，发送普通短信时为空", example = "TEMPLATE001")
    private String templateId = "";
    
    /**
     * 模板变量。格式： ["param1=value1","param2=value2"]，无变量模板填[""]
     */
    @Schema(description = "模板变量", example = "[\"param1=value1\",\"param2=value2\"]")
    private List<String> params;
} 